<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>http::header</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Boost.Beast">
<link rel="up" href="../ref.html" title="This Page Intentionally Left Blank 2/2">
<link rel="prev" href="boost__beast__http__file_body.html" title="http::file_body">
<link rel="next" href="boost__beast__http__header/fields_type.html" title="http::header::fields_type">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="boost__beast__http__file_body.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="boost__beast__http__header/fields_type.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="beast.ref.boost__beast__http__header"></a><a class="link" href="boost__beast__http__header.html" title="http::header">http::header</a>
</h4></div></div></div>
<p>
        A container for an HTTP request or response header.
      </p>
<h5>
<a name="beast.ref.boost__beast__http__header.h0"></a>
        <span class="phrase"><a name="beast.ref.boost__beast__http__header.synopsis"></a></span><a class="link" href="boost__beast__http__header.html#beast.ref.boost__beast__http__header.synopsis">Synopsis</a>
      </h5>
<p>
        Defined in header <code class="literal">&lt;<a href="../../../../../../boost/beast/http/message.hpp" target="_top">boost/beast/http/message.hpp</a>&gt;</code>
      </p>
<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span>
    <span class="keyword">bool</span> <span class="identifier">isRequest</span><span class="special">,</span>
    <span class="keyword">class</span> <span class="identifier">Fields</span> <span class="special">=</span> <span class="identifier">fields</span><span class="special">&gt;</span>
<span class="keyword">struct</span> <span class="identifier">header</span> <span class="special">:</span>
    <span class="keyword">public</span> <span class="identifier">Fields</span>
</pre>
<h5>
<a name="beast.ref.boost__beast__http__header.h1"></a>
        <span class="phrase"><a name="beast.ref.boost__beast__http__header.types"></a></span><a class="link" href="boost__beast__http__header.html#beast.ref.boost__beast__http__header.types">Types</a>
      </h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  Name
                </p>
              </th>
<th>
                <p>
                  Description
                </p>
              </th>
</tr></thead>
<tbody>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__http__header/fields_type.html" title="http::header::fields_type"><span class="bold"><strong>fields_type</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  The type representing the fields.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__http__header/is_request.html" title="http::header::is_request"><span class="bold"><strong>is_request</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Indicates if the header is a request or response.
                </p>
              </td>
</tr>
</tbody>
</table></div>
<h5>
<a name="beast.ref.boost__beast__http__header.h2"></a>
        <span class="phrase"><a name="beast.ref.boost__beast__http__header.member_functions"></a></span><a class="link" href="boost__beast__http__header.html#beast.ref.boost__beast__http__header.member_functions">Member Functions</a>
      </h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  Name
                </p>
              </th>
<th>
                <p>
                  Description
                </p>
              </th>
</tr></thead>
<tbody>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__http__header/header.html" title="http::header::header"><span class="bold"><strong>header</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Constructor.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__http__header/method.html" title="http::header::method"><span class="bold"><strong>method</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Return the request-method verb.
                </p>
                <p>
                  Set the request-method.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__http__header/method_string.html" title="http::header::method_string"><span class="bold"><strong>method_string</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Return the request-method as a string.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__http__header/operator_eq_.html" title="http::header::operator="><span class="bold"><strong>operator=</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Assignment.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__http__header/reason.html" title="http::header::reason"><span class="bold"><strong>reason</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Return the response reason-phrase.
                </p>
                <p>
                  Set the response reason-phrase (deprecated)
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__http__header/result.html" title="http::header::result"><span class="bold"><strong>result</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  The response status-code result.
                </p>
                <p>
                  Set the response status-code.
                </p>
                <p>
                  Set the response status-code as an integer.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__http__header/result_int.html" title="http::header::result_int"><span class="bold"><strong>result_int</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  The response status-code expressed as an integer.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__http__header/target.html" title="http::header::target"><span class="bold"><strong>target</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Returns the request-target string.
                </p>
                <p>
                  Set the request-target string.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__http__header/version.html" title="http::header::version"><span class="bold"><strong>version</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Return the HTTP-version.
                </p>
                <p>
                  Set the HTTP-version.
                </p>
              </td>
</tr>
</tbody>
</table></div>
<h5>
<a name="beast.ref.boost__beast__http__header.h3"></a>
        <span class="phrase"><a name="beast.ref.boost__beast__http__header.description"></a></span><a class="link" href="boost__beast__http__header.html#beast.ref.boost__beast__http__header.description">Description</a>
      </h5>
<p>
        This container is derived from the <code class="computeroutput"><span class="identifier">Fields</span></code>
        template type. To understand all of the members of this class it is necessary
        to view the declaration for the <code class="computeroutput"><span class="identifier">Fields</span></code>
        type. When using the default fields container, those declarations are in
        <a class="link" href="boost__beast__http__fields.html" title="http::fields"><code class="computeroutput"><span class="identifier">http</span><span class="special">::</span><span class="identifier">fields</span></code></a>.
      </p>
<p>
        Newly constructed header objects have version set to HTTP/1.1. Newly constructed
        response objects also have result code set to <a class="link" href="boost__beast__http__status.html" title="http::status"><code class="computeroutput"><span class="identifier">http</span><span class="special">::</span><span class="identifier">ok</span></code></a>.
      </p>
<p>
        A <code class="computeroutput"><span class="identifier">header</span></code> includes the start-line
        and header-fields.
      </p>
<p>
        Convenience header <code class="literal">&lt;<a href="../../../../../../boost/beast/http.hpp" target="_top">boost/beast/http.hpp</a>&gt;</code>
      </p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2016, 2017 Vinnie Falco<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="boost__beast__http__file_body.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="boost__beast__http__header/fields_type.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
